#!/bin/bash
# date: 2025/4/27
# desc: install nacos cluster

install() {
    # mysql -h127.0.0.1 -P3306 -root -p < 132-nacos.sql

    # http://127.0.0.1:8848
    kubectl create ns nacos
    helm install nacos . -n nacos
}

uninstall() {
    helm uninstall nacos -n nacos
    kubectl delete ns nacos
}

case "$1" in
install)
    install
    ;;
uninstall)
    uninstall
    ;;
*)
    echo "$0 install|uninstall"
    ;;
esac
